//
//  aRGifView.m
//  taobaos
//
//  Created by 陈柱成 on 16/7/2.
//  Copyright © 2016年 aReu. All rights reserved.
//

#import "aRGifView.h"

@implementation aRGifView

+(aRGifView*)shareInstance{
    static aRGifView *gifView = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        NSMutableArray *armutArr = @[].mutableCopy;
        for (NSInteger i = 1; i < 13; i++) {
            [armutArr addObject:[UIImage imageNamed:[NSString stringWithFormat:@"mini_player_frames_%ld",(long)i]]];
        }
        gifView = [[aRGifView alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
        gifView.image = [[UIImage imageNamed:@"mini_player_button"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
        gifView.animationImages = armutArr;
        
        gifView.animationDuration = .8f;
        gifView.animationRepeatCount = 1000000;
    });
    return gifView;
}


@end
